home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
shared.cst
/
00143_Script_Main Movie Script
< prev
next >
Wrap
Text File
|
1997-07-24
|
4KB
|
115 lines
-- Main Movie Scripts
--
-- For basic QTVR use this castmember includes most of the scripts you need
-- Not included are the calls to the "openQTVRMovie" handler and
-- a frame script to display the movie and allow the user to interact with
-- it (see "Movie Display Frame Script").
--------------------------------------------------------------------------
--=============================================================
-- StartMovie
--
-- Sets up things for QTVR. You only want to do this once,
-- so if you've got multiple Director movies in your project
-- put these calls in some kind of initialization handler.
---------------------------------------------------------------
global gQTVRInstance, gQTVRObj
--on StartMovie
-- global gQTVRObj
-- set gTheXtra = xtra "QTVRXtra"
-- -- register the Quicktime VR component
-- QTVREnter(xtra "QTVRXtra")
--
-- -- create a new instance of the xtra
-- set gQTVRObj = new(xtra "QTVRXtra")
--
-- put CallBackTracer(mNew) into QTVRCallBackFactory
-- SetCallBack PanoMovie, QTVRCallBackFactory
--
--
-- preloadmember "FINALMIXAmb.LoopAiff"
--
--end
--
--=============================================================
-- StopMovie
--
-- This is important: be sure to your movies when you stop.
-- Otherwise they hang out taking up ram, even though you don't see them.
-- This can be a real problem when in authoring mode, as you start and stop
-- the movie over and over. When in doubt call QTVRClose from the message window.
---------------------------------------------------------------
--on StopMovie
-- global gQTVRObj
--
-- -- Close any open QTVR movies
-- QTVRClose(gQTVRObj)
--
-- -- unregister the Quicktime VR component
-- QTVRExit(xtra "QTVRXtra")
--end
--=============================================================
-- openQTVRMovie
--
-- Opens a pano or object movie.
-- pMovieName is a full pathname to the movie (paltform-specific)
-- pSprite is a sprite placholder with the size and location you want
-- for your qtvr movie.
--
-- Note: This handler has no error checking. For an example handler with
-- error checking, see the openMovie handler in the Testbed.
---------------------------------------------------------------
on openQTVRMovie pMovieName, pSprite
global gQTVRObj
-- Close any open QTVR movies
QTVRClose(gQTVRObj)
-- rectToStr is a handler below
set tRect = rectToStr(the rect of sprite pSprite)
put QTVROpen(gQTVRObj, pMovieName, tRect, "visible")
end
--=============================================================
-- utilities
--
-- these handlers convert Lingo's rect and point variable types
-- to strings for use by the xtra
---------------------------------------------------------------
on rectToStr myRect
set myString = string(myRect)
delete char 1 to 5 of myString
delete char (the length of myString) of myString
return myString
end
on pointToStr myPoint
set myString = string(myPoint)
delete char 1 to 6 of myString
delete char (the length of myString) of myString
return myString
end
on hilite whereto
set origclick = the clickon
set origmem = the membernum of sprite origclick
set the member of sprite origclick = origmem+ 1
updatestage
repeat while the mousedown
set the member of sprite origclick = origmem + rollover(origclick)
updatestage
end repeat
if the membernum of sprite origclick <> origmem then
puppetsprite 4, true
go whereto
end if
end hilite